﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ModuleByCates.ascx.cs"
    Inherits="Controls_admin_ModuleByCates" %>
<!-- table -->
<div class="box">
    <!-- box / title -->
    <div class="title">
        <h5 id="title" runat="server">
            Danh sách Modules</h5>
        <div class="search">
        </div>
    </div>
    <div id="divMessage" runat="server">
    </div>
    <div class="first-action">
        <div class="button">
            <a href="default.aspx?control=moduleadd">
                <input value="Thêm mới" type="button" />
            </a>
        </div>
        <div>
            Chọn danh mục:
            <asp:DropDownList ID="ddlCategories" AppendDataBoundItems="true" runat="server" AutoPostBack="true"
                OnSelectedIndexChanged="ddlCategories_SelectedIndexChanged" />
        </div>
    </div>
    <!-- end box / title -->
    <div class="table">
        <table>
            <thead>
                <tr>
                    <th>
                        Vị trí
                    </th>
                    <th>
                        Số lượng module
                    </th>
                    <th class="last">
                        Xóa hết
                    </th>
                </tr>
            </thead>
            <tbody>
                <asp:Repeater ID="rptModule" runat="server" OnItemCommand="rptModule_ItemCommand">
                    <ItemTemplate>
                        <tr>
                            <td align="center">
                                <a href='default.aspx?control=modules<%#"&location_id="+Eval("LOCATION_ID")+"&category_id="+ddlCategories.SelectedValue%>'
                                    title='<%#Eval("TIP")%>'>
                                    <%#Eval("LOCATION")%></a>
                            </td>
                            <td align="center">
                                <%#Eval("COUNT")%>
                            </td>
                            <td class="last" align="center">
                                <asp:Button runat="server" ID="btnDel" CssClass="icon-32-delete" CommandName='<%#Eval("LOCATION_ID")%>'
                                    CommandArgument='<%#Eval("MODULE_ID")%>' BackColor="Transparent" BorderStyle="None"
                                    OnClientClick="return confirm('Xóa hết các Modules trên vị trí này. Bạn có chắc chắn muốn xóa không ?');" />
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </tbody>
        </table>
        <div class="action">
            <div class="button">
                <a href="default.aspx?control=moduleadd">
                    <input value="Thêm mới" type="button" />
                </a>
            </div>
        </div>
    </div>
</div>
<!-- end table -->
